-
Notifications
You must be signed in to change notification settings - Fork 1.4k
samples: openthread: align nRF_Connect_SDK_13_14.py with GRLv64 #25848
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR aligns the nRF_Connect_SDK_13_14.py THCI (Thread Host Controller Interface) file with GRL Thread's certification framework version 64.0. The changes primarily involve updating API methods, fixing parameter ordering, and adding new functionality to support the latest certification requirements.
Key changes:
- Added new API methods for ICMP ping, SRP service registration, TCP HTTP requests, and NAT64 prefix handling
- Fixed parameter ordering in SRP-related methods (swapping priority and weight parameters)
- Enhanced UDP and DNS query methods with additional options and parameters
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -3736,7 +3765,9 @@ def get_own_omr_address(self, omr_prefix): | |||
|
|
|||
| def srp_client_remove(self, instancename, servicename): | |||
| cmd = "srp client service remove %s %s" % (instancename, servicename) | |||
| # cmd = 'srp client service remove service-test-1 _thread-test._udp' | |||
Copilot
AI
Nov 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove commented-out code. If this is an example, consider adding it to documentation instead.
| # cmd = 'srp client service remove service-test-1 _thread-test._udp' |
| self.__executeCommand(cmd) | ||
| # self.__executeCommand("netdata register") |
Copilot
AI
Nov 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove commented-out code. If this command should be executed conditionally, implement proper conditional logic instead.
| # self.__executeCommand("netdata register") |
| self.__executeCommand(cmd) | ||
| if ip_addr: | ||
| cmd += f" {ip_addr} 53 6000 3 1" | ||
| print(cmd) |
Copilot
AI
Nov 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace print statement with proper logging using self.log() as used elsewhere in the file.
| tcp_request = self.__executeCommand( | ||
| "tcp send -x %s" % hexa_http_request, ignore_exec=True | ||
| ) | ||
| print(tcp_request) |
Copilot
AI
Nov 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace print statement with proper logging using self.log() as used elsewhere in the file.
| print(tcp_request) | |
| self.log(tcp_request) |
| time.sleep(3) | ||
| self.__executeCommand("tcp sendend", ignore_exec=True) | ||
| self.__executeCommand("tcp deinit", ignore_exec=True) | ||
| return "Failed" if tcp_request is True else True |
Copilot
AI
Nov 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic is inverted and confusing. When tcp_request is True (success with ignore_exec), it returns 'Failed' string. When it's not True, it returns True boolean. This should return consistent boolean values: return tcp_request is not True.
| return "Failed" if tcp_request is True else True | |
| return tcp_request is not True |
| else: | ||
| continue |
Copilot
AI
Nov 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The else-continue is unnecessary. Remove the else clause since continue is only needed when the condition is false.
| else: | |
| continue | |
| continue |
CI InformationTo view the history of this post, click the 'edited' button above Inputs:Sources:sdk-nrf: PR head: 9fa68304ce5e3b36879db9770b43adfb3f36757a more detailssdk-nrf:
Github labels
List of changed files detected by CI (1)Outputs:ToolchainVersion: 964ddb2c70 Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped;
|
ArekBalysNordic
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ADNO
e465849 to
b9225ae
Compare
Align the nRF_Connect_SDK_13_14.py THCI file with the GRL Thread's certification framework in version 64.0. Signed-off-by: Jakub Uliarczyk <[email protected]>
b9225ae to
9fa6830
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Align the nRF_Connect_SDK_13_14.py THCI file with the GRL Thread's certification framework in version 64.0